---
page_title: "cloudflare_api_shield_schema Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a resource to manage a schema in API Shield Schema Validation 2.0.
---

# cloudflare_api_shield_schema (Resource)

Provides a resource to manage a schema in API Shield Schema Validation 2.0.

## Example Usage

```terraform
resource "cloudflare_api_shield_schema" "petstore_schema" {
  zone_id            = "0da42c8d2132a9ddaf714f9e7c920711"
  name               = "myschema"
  kind               = "openapi_v3" # optional
  validation_enabled = true         # optional, default false
  source             = file("./schemas/petstore.json")
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the schema. **Modifying this attribute will force creation of a new resource.**
- `source` (String) Schema file bytes. **Modifying this attribute will force creation of a new resource.**
- `zone_id` (String) The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**

### Optional

- `kind` (String) Kind of schema. Defaults to `openapi_v3`. **Modifying this attribute will force creation of a new resource.**
- `validation_enabled` (Boolean) Flag whether schema is enabled for validation.

### Read-Only

- `id` (String) The ID of this resource.


